using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;

using SharpCore.Data;
using SystemFramework.Util;

namespace TF.Access {
	public partial class TF_EventView {
        private string cityView;
        private string viewName;

        public string CityView
        {
            get
            {
                return cityView;
            }
            set
            {
                cityView = value;
            }
        }

        public string ViewName
        {
            get
            {
                return viewName;
            }
            set
            {
                viewName = value;
            }
        }

        public static List<TF_EventView> SelectEventViewByCityId(int cityId)
        {
            using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader("TF_EventViewSelectByCityId",cityId))
            {
                List<TF_EventView> tF_EventViewList = new List<TF_EventView>();
                while (dataReader.Read())
                {
                    TF_EventView tF_EventView = MakeTF_EventView(dataReader);
                    tF_EventView.ViewName = ConvertHelper.GetString(dataReader["ViewName"], string.Empty);
                    tF_EventViewList.Add(tF_EventView);
                }
                return tF_EventViewList;
            }
        }

	}
}
